//
//  AddItemViewController.h
//  Checklists
//
//  Created by ITC on 8/1/13.
//  Copyright (c) 2013 ITC. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ChecklistsItem.h"

@class ItemDetailViewController;

@protocol AddItemViewControllerDelegate <NSObject>

- (void)addItemViewControllerDidCancel:(ItemDetailViewController *)controller;

- (void)addItemViewController:(ItemDetailViewController *)controller didFinishAddingItem:(ChecklistsItem *)item;
- (void)addItemViewController:(ItemDetailViewController *)controller didFinishEditingItem:(ChecklistsItem *)item;
@end


@interface ItemDetailViewController : UITableViewController <UITextFieldDelegate>
{
    NSString *text;
    IBOutlet UILabel *textLbl;
}

@property (nonatomic, retain) IBOutlet UIButton *doneBarButton;
@property (nonatomic, retain) id<AddItemViewControllerDelegate> delegate;
@property (nonatomic, strong) ChecklistsItem *itemToEdit;

- (IBAction)cancel;
- (IBAction)done;

@end
